<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>js变量提升</title>
</head>
<body>
  <script>
    /**
     * 变量提升只对函数左边进行变量提升
     * 
     * 
     */
    

    
    sum()
    fn()
    var fn = function(){
      console.log(1)
    }
    function sum(){
      console.log(2)
    }
  </script>
</body>
</html>